<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<Venue>" %>

<%@ Import Namespace="TeamCommunitySolution.Domain.DataLayer.Venues" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    Details
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <!-- map key ABQIAAAA21Hd38D-3HBm3jYO7nnNWRS1_CEQRvcVD0ZnoYpkNmXpiEBGKxQFkW54IiNaBNRolZjh5IhYlViRyw -->

    <script src="http://maps.google.com/maps?file=api&amp;v=2&amp;sensor=false&amp;key=ABQIAAAA21Hd38D-3HBm3jYO7nnNWRS1_CEQRvcVD0ZnoYpkNmXpiEBGKxQFkW54IiNaBNRolZjh5IhYlViRyw"
        type="text/javascript"></script>

    <h2>
        Details</h2>
    <fieldset>
        <legend>Message</legend>Name:
        <%= Html.Encode(Model.Name)%><br />
        Latitude:
        <%= Html.Encode(Model.Latitude)%><br />
        Longditude:
        <%= Html.Encode(Model.Longditude)%><br />
        Date Founded:
        <%= Html.Encode(String.Format("{0:d}", Model.DateFounded))%><br />
        Website:
        <%= Html.Encode(Model.Website)%><br />
        Owner:
        <%= Html.Encode(Model.Owner.NickName)%><br />
        Description:
        <pre>
            <%= Html.Encode(Model.Description)%>
        </pre>
    </fieldset>
    <div id="map_canvas" style="width: 500px; height: 300px; border: 1px solid #000000">
    </div>

    <script type="text/javascript">
    
    function initialize() {
      if (GBrowserIsCompatible()) {
        var map = new GMap2(document.getElementById("map_canvas"));
        map.setCenter(new GLatLng(<%= Html.Encode(Model.Latitude)%>, <%= Html.Encode(Model.Longditude)%>), 13);
        
        var point = new GLatLng(<%= Html.Encode(Model.Latitude)%>,<%= Html.Encode(Model.Longditude)%>);
        map.addOverlay(new GMarker(point));

      }
  }
  
  initialize();
    </script>k

</asp:Content>
